#ifndef PROCESS_H_
#define PROCESS_H_

#include <signal.h>
#include <sys/types.h>
#include <unistd.h>

#ifndef PIDTYPE
#define PIDTYPE
	typedef int pid;
#endif

class Process
{
public:
	Process(int* args, pid schedulerId, int initialPriority, int cpuTimeNeeded);
	virtual ~Process();	
	
	int priority;
	int myPID;

private:
	void run();
	
	void sendClockTick();
	int computeBlockTimeNeeded();
	void catchSIGUSR1(int num); // suspend - ps6 slide 28
	void updateStatistics(); // signature will probably change
	
	int c1,c2,b1,b2,x0,y0,w;
	pid schedulerPid;
	int totalCpuTimeNeeded;
	int cpuTimeUsed;
};

#endif /*PROCESS_H_*/
